home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
amok_lha
/
amok15.lha
/
Seafarers_Manual
/
Source
/
C2P5.mod
< prev
next >
Wrap
Text File
|
1993-08-15
|
855b
|
34 lines
MODULE C2P5; (* Chapter 2 Problem 5 *)
(* Real Calculations *)
(* From the book "Modula-2 A Seafarer's Manual and Shipyard Guide" *)
(* Page 41 adapted "M2Amiga Modula-2" 26 Feb 1988 *)
FROM InOut IMPORT WriteLn,
WriteString;
FROM RealInOut IMPORT WriteReal;
VAR
Result : REAL;
BEGIN
WriteString ("Real Calculations: ");
WriteLn; WriteLn; WriteLn;
WriteString ("79413 inches are ");
Result := 79413.0 / (6.0 * 12.0);
WriteReal (Result,11,6);
WriteString (" fathoms");
WriteLn; WriteLn;
WriteString ("One mile has ");
Result := (5280.0 * 12.0) / 39.37;
WriteReal (Result,11,6);
WriteString (" meters");
WriteLn; WriteLn;
WriteString ("The speed of sound is ");
Result := 1088.0 / 5280.0;
WriteReal (Result,11,6);
WriteString (" miles per second");
WriteLn;
END C2P5.